import time
s = open('m1_sorted.txt')
start = time.time()
a = [int(i) for i in s]
for i in range(len(a) - 1):
    for j in range(len(a) - 2, i - 1, -1):
        if a[j]>a[j+1]:
            a[j], a[j+1] = a[j+1], a[j]
finish = time.time()
print(a)
print('m1_sorted',(round((finish - start)*1000)),'milliseconds')
import time
s = open('m2_reverse.txt')
start = time.time()
a = [int(i) for i in s]
for i in range(len(a) - 1):
    for j in range(len(a) - 2, i - 1, -1):
        if a[j]>a[j+1]:
            a[j], a[j+1] = a[j+1], a[j]
finish = time.time()
print(a)
print('m2_reverse',(round((finish - start)*1000)),'milliseconds')
import time
s = open('m3_shuffle.txt')
start = time.time()
a = [int(i) for i in s]
for i in range(len(a) - 1):
    for j in range(len(a) - 2, i - 1, -1):
        if a[j]>a[j+1]:
            a[j], a[j+1] = a[j+1], a[j]
finish = time.time()
print(a)
print('m3_shuffle',(round((finish - start)*1000)),'milliseconds')